﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Runtime.InteropServices;

namespace SGS
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            //browser.Navigate("http://web.sanguosha.com/220/play.html?server=5");
        }

        int y = 0;
        public void ClickMe(object sender, RoutedEventArgs e)
        {
            //IntPtr handle = browser.Handle;
            //StringBuilder className = new StringBuilder(100);
            //while (className.ToString() != "MacromediaFlashPlayerActiveX") // your mileage may vary with this classname
            //{
            //    handle = GetWindow(handle, 5); // 5 == child
            //    GetClassName(handle, className, className.Capacity);
            //}

            //int x = 200;
            //y += 10;
            //IntPtr lParam = (IntPtr)((y << 16) | x); // X and Y coordinates of the click
            ////IntPtr lParam = IntPtr.Zero;
            //IntPtr wParam = IntPtr.Zero; // change this if you want to simulate Ctrl-Click and such
            //const uint downCode = 0x0201; // these codes are for single left clicks
            //const uint upCode = 0x0202;
            //SendMessage(handle, downCode, wParam, lParam); // mousedown
            //SendMessage(handle, upCode, wParam, lParam); // mouseup

            //SendMessage(handle, 0x0204, wParam, lParam); // mousedown
            //SendMessage(handle, 0x0205, wParam, lParam); // mouseup
        }
    }
}
